home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q0429.dms / q0429.adf / rayview / main.c < prev    next >
C/C++ Source or Header  |  1991-08-08  |  2KB  |  72 lines

  1. /*
  2.  * main.c
  3.  *
  4.  * Copyright (C) 1989, 1991, Craig E. Kolb
  5.  * All rights reserved.
  6.  *
  7.  * This software may be freely copied, modified, and redistributed
  8.  * provided that this copyright notice is preserved on all copies.
  9.  *
  10.  * You may not distribute this software, in whole or in part, as part of
  11.  * any commercial product without the express consent of the authors.
  12.  *
  13.  * There is no warranty or other guarantee of fitness of this software
  14.  * for any purpose.  It is provided solely "as is".
  15.  *
  16.  * $Id: main.c,v 4.0 91/07/17 14:55:35 kolb Exp Locker: kolb $
  17.  *
  18.  * $Log:    main.c,v $
  19.  * Revision 4.0  91/07/17  14:55:35  kolb
  20.  * Initial version.
  21.  * 
  22.  */
  23.  
  24. char rcsid[] = "$Id: main.c,v 4.0 91/07/17 14:55:35 kolb Exp Locker: kolb $";
  25.  
  26. #include "rayshade.h"
  27. #include "options.h"
  28. #include "stats.h"
  29. #include "viewing.h"
  30. #include "picture.h"
  31.  
  32.  
  33. int
  34. main(argc, argv)
  35. int argc;
  36. char **argv;
  37. {
  38.     Float utime, stime;
  39.  
  40.     /*
  41.       * Initialize variables, etc.
  42.      */
  43.     RSInitialize(argc, argv);
  44.     MethodsRegister();
  45.  
  46.     RSStartFrame(0);
  47.     /*
  48.       * Print more information than we'll ever need to know...
  49.      */
  50.     if (Options.verbose) {
  51.         extern Geom *World;
  52.         /* World object info. */
  53.         AggregatePrintInfo(World, Stats.fstats);
  54.         /* Print info about rendering options and the like. */
  55.         RSOptionsList();
  56.     }
  57.     /*
  58.      * Print preprocessing time.
  59.      */
  60.     RSGetCpuTime(&utime, &stime);
  61.     fprintf(Stats.fstats,"Preprocessing time:\t");
  62.     fprintf(Stats.fstats,"%2.2fu  %2.2fs\n", utime, stime);
  63.     fprintf(Stats.fstats,"Starting trace.\n");
  64.     (void)fflush(Stats.fstats);
  65.     /*
  66.      * Draw the image.
  67.      */
  68.     Render();
  69.     StatsPrint();
  70.     return 0;
  71. }
  72.